import { request } from "@/utils/request";

// 注册
export const articleAPI = (data) => {
    // console.log(request);
    return request.post("/api/register", data)
}

// 登录
export const loginAPI = (data) => {
    // console.log(request);
    return request.post("/api/login", data)
}

// 初始化数据
export const initStudent = () => {
    return request.get("/init/data")
}

// 获取学员成绩
export const allStudentListAPI = () => {
    // console.log(request);
    return request.get("/score/list")
}

// 提交修改成绩
export const modifyStudenScoreAPI = (id, num, score) => {
    // console.log(request);
    const data = { stu_id: id, batch: num, score: score }
    return request.post("/score/entry", data)
}
